Integrand size = 18, antiderivative size = 68 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=-\frac {\sqrt {2-x-x^2}}{x}+\arcsin \left (\frac {1}{3} (-1-2 x)\right )+\frac {\text {arctanh}\left (\frac {4-x}{2 \sqrt {2} \sqrt {2-x-x^2}}\right )}{2 \sqrt {2}} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {746, 857, 633, 222, 738, 212} \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=\arcsin \left (\frac {1}{3} (-2 x-1)\right )+\frac {\text {arctanh}\left (\frac {4-x}{2 \sqrt {2} \sqrt {-x^2-x+2}}\right )}{2 \sqrt {2}}-\frac {\sqrt {-x^2-x+2}}{x} \]
[In]
[Out]
Rule 212
Rule 222
Rule 633
Rule 738
Rule 746
Rule 857
Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {2-x-x^2}}{x}+\frac {1}{2} \int \frac {-1-2 x}{x \sqrt {2-x-x^2}} \, dx \\ & = -\frac {\sqrt {2-x-x^2}}{x}-\frac {1}{2} \int \frac {1}{x \sqrt {2-x-x^2}} \, dx-\int \frac {1}{\sqrt {2-x-x^2}} \, dx \\ & = -\frac {\sqrt {2-x-x^2}}{x}+\frac {1}{3} \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{9}}} \, dx,x,-1-2 x\right )+\text {Subst}\left (\int \frac {1}{8-x^2} \, dx,x,\frac {4-x}{\sqrt {2-x-x^2}}\right ) \\ & = -\frac {\sqrt {2-x-x^2}}{x}+\sin ^{-1}\left (\frac {1}{3} (-1-2 x)\right )+\frac {\tanh ^{-1}\left (\frac {4-x}{2 \sqrt {2} \sqrt {2-x-x^2}}\right )}{2 \sqrt {2}} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.12 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=-\frac {\sqrt {2-x-x^2}}{x}+2 \arctan \left (\frac {\sqrt {2-x-x^2}}{2+x}\right )-\frac {\text {arctanh}\left (\frac {\sqrt {2-x-x^2}}{\sqrt {2} (-1+x)}\right )}{\sqrt {2}} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.88
method | result | size |
risch | \(\frac {x^{2}+x -2}{x \sqrt {-x^{2}-x +2}}-\arcsin \left (\frac {1}{3}+\frac {2 x}{3}\right )+\frac {\operatorname {arctanh}\left (\frac {\left (4-x \right ) \sqrt {2}}{4 \sqrt {-x^{2}-x +2}}\right ) \sqrt {2}}{4}\) | \(60\) |
default | \(-\frac {\left (-x^{2}-x +2\right )^{\frac {3}{2}}}{2 x}-\frac {\sqrt {-x^{2}-x +2}}{4}-\arcsin \left (\frac {1}{3}+\frac {2 x}{3}\right )+\frac {\operatorname {arctanh}\left (\frac {\left (4-x \right ) \sqrt {2}}{4 \sqrt {-x^{2}-x +2}}\right ) \sqrt {2}}{4}+\frac {\left (-1-2 x \right ) \sqrt {-x^{2}-x +2}}{4}\) | \(88\) |
trager | \(-\frac {\sqrt {-x^{2}-x +2}}{x}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x +2 \sqrt {-x^{2}-x +2}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )\right )-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x +4 \sqrt {-x^{2}-x +2}-4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )}{x}\right )}{4}\) | \(104\) |
[In]
[Out]
none
Time = 0.42 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.35 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=\frac {\sqrt {2} x \log \left (-\frac {4 \, \sqrt {2} \sqrt {-x^{2} - x + 2} {\left (x - 4\right )} + 7 \, x^{2} + 16 \, x - 32}{x^{2}}\right ) + 8 \, x \arctan \left (\frac {\sqrt {-x^{2} - x + 2} {\left (2 \, x + 1\right )}}{2 \, {\left (x^{2} + x - 2\right )}}\right ) - 8 \, \sqrt {-x^{2} - x + 2}}{8 \, x} \]
[In]
[Out]
\[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=\int \frac {\sqrt {- \left (x - 1\right ) \left (x + 2\right )}}{x^{2}}\, dx \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.87 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (\frac {2 \, \sqrt {2} \sqrt {-x^{2} - x + 2}}{{\left | x \right |}} + \frac {4}{{\left | x \right |}} - 1\right ) - \frac {\sqrt {-x^{2} - x + 2}}{x} + \arcsin \left (-\frac {2}{3} \, x - \frac {1}{3}\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (52) = 104\).
Time = 0.37 (sec) , antiderivative size = 168, normalized size of antiderivative = 2.47 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=-\frac {1}{4} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} + \frac {2 \, {\left (2 \, \sqrt {-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 6 \right |}}{{\left | 4 \, \sqrt {2} + \frac {2 \, {\left (2 \, \sqrt {-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 6 \right |}}\right ) + \frac {6 \, {\left (\frac {3 \, {\left (2 \, \sqrt {-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 1\right )}}{\frac {6 \, {\left (2 \, \sqrt {-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + \frac {{\left (2 \, \sqrt {-x^{2} - x + 2} - 3\right )}^{2}}{{\left (2 \, x + 1\right )}^{2}} + 1} - \arcsin \left (\frac {2}{3} \, x + \frac {1}{3}\right ) \]
[In]
[Out]
Time = 10.01 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.07 \[ \int \frac {\sqrt {2-x-x^2}}{x^2} \, dx=\frac {\sqrt {2}\,\ln \left (\frac {2}{x}+\frac {\sqrt {2}\,\sqrt {-x^2-x+2}}{x}-\frac {1}{2}\right )}{4}-\frac {\sqrt {-x^2-x+2}}{x}+\ln \left (x\,1{}\mathrm {i}+\sqrt {-x^2-x+2}+\frac {1}{2}{}\mathrm {i}\right )\,1{}\mathrm {i} \]
[In]
[Out]